package util;

/**
 * @author wq3stone
 */
public class Test {
    public static void main(String[] args) {
        String s = " abcD12,43eD,f8eD8 ";
        String[] split = s.split(","); //按照传入参数","分割成字符串数组
        int length = s.length();    //字符串的长度
        String s1 = s.toLowerCase();  //将字符串中所有的英文字符变为小写
        String s2 = s.toUpperCase();  //将字符串中所有的英文字符变为大写
        boolean f88 = s.endsWith("f88 ");//匹配结尾字符串是否为”f88“
        boolean contains = s.contains("42");  //匹配字符串中是否存在”42“
        String eD = s.replace("eD", "666");  //替换字符串中的"eD"为”666“
        boolean matches = s.matches("[,0-9A-z]*");  //按照正则表达式匹配字符串
        String trim = s.trim();   // 删除前后两端的空格
        char[] chars = s.toCharArray();  //将字符串转为字符数组
        CharSequence charSequence = s.subSequence(3, 5);  //截取字符串索引为3-4的数组并返回
    }
}
